import request from '@/utils/request'

// 查询照片登记列表
export function listPhotoregistration(query) {
  return request({
    url: '/ruoyi-system/photoregistration/list',
    method: 'get',
    params: query,
  })
}

// 查询照片登记详细
export function getPhotoregistration(id) {
  return request({
    url: '/ruoyi-system/photoregistration/' + id,
    method: 'get',
  })
}

// 新增照片登记
export function addPhotoregistration(data) {
  return request({
    url: '/ruoyi-system/photoregistration',
    method: 'post',
    data: data,
  })
}

// 修改照片登记
export function updatePhotoregistration(data) {
  return request({
    url: '/ruoyi-system/photoregistration',
    method: 'put',
    data: data,
  })
}

// 删除照片登记
export function delPhotoregistration(id) {
  return request({
    url: '/ruoyi-system/photoregistration/' + id,
    method: 'delete',
  })
}

// 预览
export function previewPhotoregistration(params, id) {
  return request({
    url: '/ruoyi-system/photoregistration/preview',
    method: 'get',
    params,
  })
}

// 预览
export function previewPhotoregistrationPdf(data) {
  return request({
    url: '/ruoyi-system/photoregistration/pdfPreview',
    method: 'post',
    data,
  })
}

// 导出
export function exportPhotoregistration(data) {
  return request({
    url: '/ruoyi-system/photoregistration/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 上传附件
export function uploadPhotoregistrationFiles(data) {
  return request({
    url: '/ruoyi-system/photoregistration/addFiles',
    method: 'post',
    data,
  })
}
